package cn.edu.sjtu.se.dslab.service;

import java.util.List;
import java.util.Map;

import cn.edu.sjtu.se.dslab.action.bean.PageBean;
import cn.edu.sjtu.se.dslab.component.design.DesignPatternComponent;
import cn.edu.sjtu.se.dslab.component.design.DesignPatternType;
import cn.edu.sjtu.se.dslab.component.dp.parse.DesignPatternInstanceBean;
import cn.edu.sjtu.se.dslab.exception.DBException;
import cn.edu.sjtu.se.dslab.project.Project;

public interface IDesignPatternComponentService {
	
	public boolean addDesignPatternComponent(DesignPatternComponent designPatternComponent);

	public DesignPatternComponent updateDesignPatternComponent(DesignPatternComponent dpComponent);

	public DesignPatternComponent getDesignPatternComponentById(long id);

	public PageBean getPageBean(int pageNum) throws DBException;
	
	public List<DesignPatternComponent> getDesignPatternComponentList();
	
	public List<DesignPatternComponent> getDesignPatternComponentsByDP(int pgNo, int pgSize, String uri);

	public DesignPatternComponent getDesignPatternComponentByUri(String uri);

	boolean addAllDesignPatternComponent(Project project);

	public List<DesignPatternComponent> getDesignPatternComponentsByProject(
			long projectId);

	public DesignPatternComponent getDesignPatternCommponentByType(long projectId,
			DesignPatternType dpType);
	
	public DesignPatternInstanceBean getDesignPatternInstanceBean(String uri);
	
	//public void deleteBusDpcItem(String itemName, String itemValue, String dpcUri);
	
	public void addDpcItem(Map<String, String> propertyMap, String dpcUri);

	public void deleteDpcItem(String itemName, String itemValue, String dpcUri);





}
